package chat;


public class MyInfo extends PeerInfo
{
    public MyInfo( String pChatName , String pOverideIPs , int pPort )
    {
        super( "(you)" , getIPs( pOverideIPs ) , pPort );
        setID( "--" );
        setChatName( pChatName );
    }

    private static String getIPs( String pOverideIPs )
    {
        return (pOverideIPs != null) ? pOverideIPs : getIPs();
    }

    public static String getIPs()
    {
        String s , retval = ThisMachine.getIPAddress( 0 );

        for ( int i = 1 ; null != (s = ThisMachine.getIPAddress( i )) ; i++ )
            retval += "," + s;

        return retval;
    }
}
